import Cookies from 'js-cookie'

const TokenKey = 'vue_admin_template_token'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

// import Cookies from 'js-cookie'

// const TokenKey = 'vue_admin_template_token'

// // 箭头函数shi导出
// export const getToken = () => Cookies.get(TokenKey)

// export const setToken = (token) => Cookies.set(TokenKey, token)

// export const removeToken = () => Cookies.remove(TokenKey)

// // 默认导出 加自定义名称调用
// export default {
//   getToken() {
//     return Cookies.get(TokenKey)
//   },
//   setToken(token) {
//     return Cookies.set(TokenKey, token)
//   },
//   removeToken() {
//     return Cookies.remove(TokenKey)
//   }
// }
